package com.mls.fivedistrict.server;

import com.mls.fivedistrict.common.PageFilter;
import com.mls.fivedistrict.common.ServiceResponse;
import com.mls.fivedistrict.pojo.Calculate;

import java.util.List;
//import com.mls.fivedistrict.pojo.Calculate;

/**
 * Created by chenxiuxiang on 2018/3/23.
 */
public interface CalculateService {

    /**
     * 添加算力
     *
     * @return
     */
    ServiceResponse addCalculate(Calculate calculate);


    /**
     * 删除算力
     *
     * @param id
     * @return
     */
    ServiceResponse deleteCalculate(Long id);

    /**
     * 获取需要回收的算力
     *
     * @return
     */
    List<Calculate> getCalculateByRecy();


    int editCalculate(Calculate calculate);


    List<Calculate> getCalculateByUserId(Long userId, PageFilter pageFilter);


    List<Calculate> getCalculateList(PageFilter pageFilter);

    /**
     * 删除用户的所有算力
     *
     * @return
     */
    int deleteUserCalculate(Long userId);


    void calculateRecy();

    Long insertCalculate(Calculate calculate);

    Calculate getCalculateById(Long calculateId);

}
